﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace EnDecrypt
{
   public static class EnDecrypt
    {
       public static string MD5Encrypt(string strText)
       {
           MD5 md5 = new MD5CryptoServiceProvider();
           byte[] result = md5.ComputeHash(System.Text.Encoding.UTF8.GetBytes(strText));
           string str = "";
           for (int i = 0, j = result.Length; i < j; i++)
               str += result[i].ToString("X2");
           return str;
       } 
    }
}
